<template>
  <a-form-model :model="node" ref="dataForm" class="flowEditForm margin13">
    <a-form-model-item label="GUID">
      <a-input disabled v-model="node.id"></a-input>
    </a-form-model-item>
    <a-form-model-item label="名称">
      <a-input v-model="node.label"></a-input>
    </a-form-model-item>
    <a-form-model-item label="活动类型">
      <a-select v-model="node.Type" placeholder="请选择">
        <a-select-option v-for="item in TypeList" :key="item.Value" :label="item.Text" :value="item.Value">{{ item.Text }}</a-select-option>
      </a-select>
    </a-form-model-item>
    <a-form-model-item label="备注">
      <a-input v-model="node.Remark" type="textarea"></a-input>
    </a-form-model-item>
  </a-form-model>
</template>

<script>
export default {
  name: 'editNode',
  data() {
    return {
      node: {},
      TypeList: [
        { Value: 1, Text: '起点' },
        { Value: 2, Text: '终点' },
        { Value: 3, Text: '人工活动' },
        { Value: 4, Text: '自由活动' },
      ],
    }
  },
  methods: {
    init(data, id) {
      data.nodeList.filter((node) => {
        if (node.id === id) {
          this.node = node
        }
      })
    },
  },
}
</script>
